
module.exports = function (sequelize, DataTypes) {
    return sequelize.define('user', {
        id: {
			type: DataTypes.INTEGER,
			allowNull: false,
			primaryKey: true
		},
		name: {
			type: DataTypes.STRING,
			allowNull: false
        },
        openid: {
            type: DataTypes.STRING,
            allowNull: false
        },
        unionid: {
            type: DataTypes.STRING,
            allowNull: false
        }
    },
    {
        tableName: 'user',
        freezeTableName: true,
        timestamps: true,
        underscoredAll: true,
        underscored: true
    })
}
